<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8"/>
    <title>角色编辑页面</title>
    <link rel="stylesheet" type="text/css" th:href="@{/zui/css/zui.css}"/>
</head>
<body>
<div class="container">
    <div class="container">
        <h1>电影信息管理系统</h1>
        <p><a><i class="icon icon-user"></i>16软件5班_谢金州_31号</a></p>
        <hr style="margin-top: 0;"/>
        <div class="col-md-2">
            <ul class="nav nav-stacked nav-tabs">
                <li>
                    <a th:href="@{/admin/index}">首页</a>
                </li>
                <li class="active">
                    <a th:href="@{/movie/index/0}">电影管理</a>
                </li>
                <li>
                    <a th:href="@{/actor/index/0}">演员管理</a>
                </li>
            </ul>
        </div>
        <div class="col-md-10">
            <div class="panel">
                <div class="panel-body" style="padding: 0;">
                    <ol class="breadcrumb" style="margin: 0;">
                        <li><a th:href="@{/admin/index}"><i class="icon icon-home"></i>首页</a></li>
                        <li><a th:href="@{/movie/index/0}">电影管理</a></li>
                        <li><a th:href="@{/movie/detail/{movieId}(movieId=${movie.id})}">电影详情</a></li>
                        <li><a th:href="@{/role/{movieId}/edit/{roidId}(movieId=${movie.id},roidId=${role.id})}">角色编辑</a>
                        </li>
                    </ol>
                </div>
            </div>
            <div class="panel">
                <div class="panel-heading">角色编辑</div>
                <div class="panel-body">
                    <br/>
                    <form th:action="@{/role/edit}" method="post">
                        <div class="row" style="margin-bottom: 10px;">
                            <div class="col-xs-3"></div>
                            <div class="col-xs-2">
                                <label for="photo">角色名称</label>
                            </div>
                            <div class="col-xs-4">
                                <input type="text" class="form-control" name="name" th:value="${role.name}"/>
                            </div>
                            <div class="col-xs-3"></div>
                        </div>
                        <div class="row" style="margin-bottom: 10px;">
                            <div class="col-xs-3"></div>
                            <div class="col-xs-2">
                                <label for="photo">演员名称</label>
                            </div>
                            <div class="col-xs-4">
                                <select class="form-control" name="actorId">
                                    <option th:text="'当前演员为：'+${role.actor.name}"></option>
                                    <option th:each="actor,actorStat : ${actors}" th:text="${actor.name}"
                                            th:value="${actor.id}"></option>
                                </select>
                            </div>
                            <div class="col-xs-3"></div>
                        </div>
                        <br/>
                        <div class="row" style="margin-bottom: 10px;">
                            <div class="col-xs-5"></div>
                            <div class="col-xs-4">
                                <input type="hidden" name="roleId" th:value="${role.id}"/>
                                <input type="hidden" name="movieId" th:value="${movie.id}"/>
                                <button class="btn btn-primary" type="submit">保存</button>
                            </div>
                            <div class="col-xs-3"></div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>